import elementUI from 'element-ui'
export default {
  $confirm(title) {
    return new Promise((resolve) => {
      elementUI.MessageBox.confirm(title || "您确定进行此操作", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(res => {
        resolve(true);
      }).catch(err => {
        resolve(false);
      });
    });
  }
}
